
let a = {'name':1}
let b = {'name':2}
const r = {
    a,
    b
}
Object.keys(r).forEach(name=>{
    console.log(r[name].name,r[name],'sh')
})

const dd =[
    a,b
]
dd.map(name=>{
    console.log(name.name,name,'def6e')
})